package ph.h.audiobook;

import java.io.File;

import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.graphics.PixelFormat;
import android.view.Menu;
import android.widget.MediaController;
import android.widget.Toast;
import android.widget.VideoView;

public class VideoActivity extends Activity {

	 private VideoView mVideoView;
	 final private String rootFolder = "audiobooks";
	 final private String videosFolder = "videos";
	 
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_video);
		

		 getWindow().setFormat(PixelFormat.TRANSLUCENT);
		 mVideoView = (VideoView) findViewById(R.id.surface_view);
	     mVideoView.setVideoURI(Uri.parse(Environment.getExternalStorageDirectory().toString() +"/" + rootFolder + "/" + videosFolder + "/"
					+ "Andy_McKee_Into_the_Ocean.mp4"));
	     mVideoView.setMediaController(new MediaController(this));
	     mVideoView.requestFocus();
	    mVideoView.start();
	     }

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.video, menu);
		return true;
	}
	

	

}
